import request from '@/utils/request'
// 获取组织架构列表
export function fetchDepartmentList() {
  return request({
    url: '/company/department',
    method: 'GET'
  })
}
// 获取部门负责人列表
export function getEmployeeSimple() {
  return request({
    url: '/sys/user/simple'
  })
}

// 新增部门负责人列表
export function addDepartments(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 删除部门负责人列表
export function fetchDelDepart(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'

  })
}

// 获取部门详细信息接口
export function getDepartDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}

// 更新详情
export function fetchUpdateDepart(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data

  })
}
